package com.sc.nft.entity.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.sc.nft.enums.ConSignStatus;
import com.sc.nft.enums.OrderStatusEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class AdminSecondEquityPropsOrderListVO {

    @ApiModelProperty(name = "订单号")
    private String orderNO;

    @ApiModelProperty(name = "交易时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date dealTime;

    @ApiModelProperty(name = "付款时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date payTime;

    @ApiModelProperty(name = "下单时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @ApiModelProperty(name = "道具卡名称")
    private String firstTitle;

    @ApiModelProperty(name = "购买价格")
    private BigDecimal buyPrice;

    @ApiModelProperty(name = "手续费")
    private BigDecimal charge;

    @ApiModelProperty(name = "购买用户手机号")
    private String buyUserTel;

    @ApiModelProperty(name = "寄售用户手机号")
    private String salesUserTel;

    @ApiModelProperty(name = "寄售状态 CLOSE:关闭 WAIT_PAY:待支付 PAYMENT:已付款 OVERDUE:过期")
    private OrderStatusEnum status;


    public void setStatus(OrderStatusEnum status) {
        this.status = status;
        if(status != OrderStatusEnum.PAYMENT){
             this.dealTime = null;
            this.payTime = null;
        }
    }
}
